package com.qst.system.service.impl;

import com.qst.system.domain.Idcard;
import com.qst.system.domain.vo.IdcardVo;
import com.qst.system.mapper.IdcardMapper;
import com.qst.system.service.IIdcardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class IdcardServiceImpl implements IIdcardService {

    @Autowired
    private IdcardMapper idcardMapper;

    @Override
    public List<IdcardVo> selectIdcardList(IdcardVo idcard) {
        List<IdcardVo> idcardList = idcardMapper.selectIdcardList(idcard);
        return idcardList;
    }

    @Override
    public IdcardVo selectIdcardById(Long id) {
        return idcardMapper.selectIdcardById(id);
    }

    @Override
    public int insertIdcard(IdcardVo idcard) {
        int i = idcardMapper.insertIdcard(idcard);
        return i;
    }

    @Override
    public int updateIdcard(IdcardVo idcard) {
        return idcardMapper.updateIdcard(idcard);
    }

    @Override
    public int deleteIdcardById(Long id) {
        return idcardMapper.deleteIdcardById(id);
    }

    @Override
    public int deleteIdcardByIds(Long[] ids) {
        return idcardMapper.deleteIdcardByIds(ids);
    }

    @Override
    public List<String> getCompanyName() {
        List<String> companyName = idcardMapper.getCompanyName();
        return companyName;
    }
}
